//
//  LGYPostDetailRequestViewCell.swift
//  KJLGT
//
//  Created by jenkin on 2019/8/27.
//  Copyright © 2019年 jenkin. All rights reserved.
//

import UIKit

class LGTPostDetailRequestViewCell: UITableViewCell {

    var descLabel:UILabel?
    var titleLabel:UILabel?
    
    private var _model:Dictionary<String, Any>?
    var model:Dictionary<String, Any>{
        get{
            return _model ?? Dictionary.init()
        }set{
            _model = newValue
            self.setData()
        }
    }
    
    func setData(){
        self.descLabel?.text = self.model["taskRequest"] as? String ?? ""
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        
        
        self.titleLabel = LGTViewCreateUtil.share.createLabel(textAlignment: NSTextAlignment.left, textColor: TextColor, fontSize: SizeFitFloat(16), text: "任务要求")
        self.titleLabel?.numberOfLines = 0
        self.addSubview(self.titleLabel!)
        self.titleLabel!.snp.makeConstraints { (make) in
            make.left.equalTo(SizeFitFloat(13))
            make.top.equalTo(SizeFit(14))
            make.height.equalTo(SizeFitFloat(17))
        }
        
        let line:UIImageView = LGTViewCreateUtil.share.createLineView()
        self.addSubview(line)
        line.snp.makeConstraints { (make) in
            make.left.equalTo(SizeFit(13))
            make.right.equalTo(-SizeFit(11))
            make.height.equalTo(1)
            make.top.equalTo(SizeFit(36))
        }
        
        self.descLabel = LGTViewCreateUtil.share.createLabel(textAlignment: NSTextAlignment.left, textColor: GrayColor, fontSize: SizeFitFloat(16), text: "")
        self.addSubview(self.descLabel!)
        self.descLabel?.numberOfLines = 0
        self.addSubview(self.descLabel!)
        self.descLabel!.snp.makeConstraints { (make) in
            make.left.equalTo(SizeFit(13))
            make.right.equalTo(-SizeFit(13))
            make.top.equalTo(SizeFit(48))
            make.bottom.equalTo(SizeFit(-32))
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
